<template>
	<view class="apps">
		<view class="flex banner">
			<image :src="info.image"></image>
		</view>
		<view class="flex fdc bgwhite plr20 mb20 pb20">
			<view class="flex aic ptb20">
				<text class="black f30 ">{{info.title}}</text>
			</view>
			<view class="flex aic">
				<text class="black f26 c666 ">{{info.description}}</text>
			</view>
		</view>
		<view class="flex fdc bgwhite plr20 mb20 pt20" v-if="list.length > 0">
			<view class="flex mb20" v-for="(item,index) in list" @click="handle(item.id)">
				<view class="flex thumb"><image :src="item.image"></image></view>
				<view class="flex fdc pl10">
					<view class="black fweight4 f28 pb10">{{item.company_name}}</view>
					<view class="c666 f26 t3hd">{{item.description}}</view>
				</view>
			</view>
		</view>
		<view class="" v-else>
			<uv-empty mode="data" text="暂无服务顾问团队"></uv-empty>
		</view>
	</view>
</template>

<script setup>
	import { util } from '/common/util.js';
	import { ref, reactive, nextTick  } from 'vue';
	import { onLoad,onShow,onReachBottom } from '@dcloudio/uni-app'
	const info =ref({}),id=ref(0),list=ref([])
	const getDetail= ()=>{
		util.request({url:"/serve/detail",data:{id:id.value},type:'get'}).then((rlt)=>{
			info.value = rlt.data
			uni.setNavigationBarTitle({
			  title: rlt.data.title,
			});
		})
	},getlist = ()=>{
		util.request({url:"/serve/team",data:{id:id.value},type:'get'}).then((rlt)=>{
					list.value = rlt.data
				})
	},handle = (e)=>{
		uni.navigateTo({
			url:"/pages/service/team?id="+e,
		})
	}
	onLoad((opt)=>{
		id.value = opt.id
		getDetail()
		getlist()
	})
</script>

<style scoped>
	.banner image{width:750rpx;height: 375rpx;}
	.thumb image{width:200rpx;height:160rpx;}
</style>